home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2002 #11 / Amiga Plus CD - 2002 - No. 11.iso / Tools / Freeware / DiskMaster / Rexx / DMLZXSelExt.rexx < prev    next >
Encoding:
OS/2 REXX Batch file  |  2002-10-27  |  871 b   |  44 lines

  1. /* $VER: DMLZXSelExt.rexx 1.1 (11.10.98) by J. Tierney
  2.  
  3.   DiskMasterII LZX Selective Extract  v1.1
  4.   10/11/98  J. Tierney <jtierney@cyberlink-inc.com>
  5.  
  6.   Purpose:  Extracts the selected files from an archive listed with
  7.            DMLZXList2Win.rexx.
  8.  
  9.   DM Usage:  Rexx DMLZXSelExt.rexx <dest>
  10. */
  11.  
  12. OPTIONS RESULTS
  13.  
  14. PARSE ARG destdir
  15.  
  16. DIRLIST VAR flist COMMENT
  17.  
  18. IF POS('--- LZX List', flist.name.1) = 0 THEN DO
  19.   'MSG "Source window is not an LZX List window."'
  20.   EXIT 0
  21. END
  22.  
  23. arc = flist.name.2
  24.  
  25. toext = ''
  26. DO i = 3 TO flist.name.0
  27.   IF flist.sel.i THEN DO
  28.     fn = flist.name.i
  29.     IF LEFT(flist.comment.i, 8) ~= 'FLIST.CO' THEN fn = fn || flist.comment.i
  30.     x = LASTPOS(' ', fn)
  31.     toext = toext STRIP(LEFT(fn, x - 1), 'T')
  32.   END
  33. END
  34.  
  35. toext = STRIP(toext, 'B')
  36.  
  37. IF toext ~= '' THEN DO
  38.   CALL PRAGMA('D', destdir)
  39.   ADDRESS COMMAND 'LZX x' arc toext
  40. END
  41.  
  42. 'DESELECT *'
  43.  
  44.